<!DOCTYPE html>
<head>
<?php include_once VIEWS.'inc/head.php'; ?>
</head>

<body>
	<div id="back-top"></div>
	
    <?php include_once VIEWS.'inc/header.php'; ?>
    <?php include_once VIEWS.'inc/right.php'; ?>
    
	<div class="w1680 banner shadow2 js-wrapBox">
		<div class="js-left banner-left"></div>
		<div class="js-right banner-right"></div>
		<div class="w1190 overhide">
			<div class="img-box js-imgUl f-cb">
				<div class="link js-imgLi fl" style="background-image:url(<?php echo static_file('web/img/banner-img.jpg'); ?>);">
				<?php $bpro=$this->db->get_where('page',array('cid'=>21))->row_array();?>
					<div class=" banner-pic">
						<div class="banner-title">
							<h4 class="title-sw"><?php if(!empty($bpro['title4'])):?><?php echo $bpro['title4']?><?php endif;?><strong>&nbsp;<?php if(!empty($bpro['title5'])):?><?php echo $bpro['title5']?><?php endif;?></strong></h4>
							<img src="<?php echo static_file('web/img/banner-title.png'); ?>">
						</div>
						<ul class="banner-list">
							<li class="banner-list1 banner-list-btn">
								<span class="banner-list1-line">
									<img src="<?php echo static_file('web/img/banner-list1-line.png'); ?>">
								</span>
								
								<div class="banner-text-title"><?php if(!empty($bpro['title1'])):?><?php echo $bpro['title1']?><?php endif;?></div>
								<div class="banner-text"><?php if(!empty($bpro['content1'])):?><?php echo $bpro['content1']?><?php endif;?></div>
							
							</li>
							<li class="banner-list2 banner-list-btn">
								<span class="banner-list2-line">
									<img src="<?php echo static_file('web/img/banner-list2-line.png'); ?>">
								</span>
								
								<div class="banner-text-title"><?php if(!empty($bpro['title2'])):?><?php echo $bpro['title2']?><?php endif;?></div>
								<div class="banner-text"><?php if(!empty($bpro['content2'])):?><?php echo $bpro['content2']?><?php endif;?></div>
							
							</li>
							<li class="banner-list3 banner-list-btn">
								<span class="banner-list3-line">
									<img src="<?php echo static_file('web/img/banner-list3-line.png'); ?>">
								</span>
								<div class="banner-text-title"><?php if(!empty($bpro['title3'])):?><?php echo $bpro['title3']?><?php endif;?></div>
								<div class="banner-text"><?php if(!empty($bpro['content3'])):?><?php echo $bpro['content3']?><?php endif;?></div>
							</li>
						</ul>
					</div>
				</div>
				<!-- <div class="link js-imgLi fl" style="background-image:url(<?php echo static_file('web/img/banner-img.jpg'); ?>);"></div>
				<div class="link js-imgLi fl" style="background-image:url(<?php echo static_file('web/img/banner-img.jpg'); ?>);"></div> -->
			</div>
			<ul class="num js-point f-cb">
				<li class="cur fl"></li>
				<!-- <li class="fl"></li>
				<li class="fl"></li> -->
			</ul>
		</div>
		
	</div>

	<div class="w1680 p-first shadow">
		<div class="w1680 p-nav js-wrapBox2">
			<span class="fl left js-left" id="left" style="cursor: pointer;"></span>
			<div class="w1190 nav ">
				<ul class="p-nav1 js-imgUl f-cb">
				<?php if(!empty($news_nav)):?>
				<?php foreach($news_nav as $k=>$v):?>
				<?php if($k==0):?>
					<li class="js-imgLi js-pro-btn <?php echo $one==$v['id']?'act-2':'';?> " once-id="<?php echo $v['id']?>">
						<div class="show"><?php echo $v['title']?></div>
		
					</li>
				<?php else:?>	
					<li class="js-imgLi js-pro-btn <?php echo $one==$v['id']?'act-2':'';?> " once-id="<?php echo $v['id']?>">
						<div class="show"><?php echo $v['title']?></div>

					</li>
				<?php endif;?>
				<?php endforeach;?>
				<?php endif;?>
				</ul>
			</div>
			<span class="fl right js-right" id="right" style="cursor: pointer;"></span>
		</div>
	</div>
	
	<div class="w1680 p-second shadow js-ajax-box">
		<div class="p-first-down">
			<div class="p-subnav">
			<?php //if(!empty($news_nav)):?>
			<?php //$second=$this->db->order_by('sort_id','asc')->get_where('coltypes',array('cid'=>4,'depth'=>1,'fid'=>$news_nav[0]['id']))->result_array();?>
				<?php //if(!empty($second)):?>
				<?php //foreach($second as $k=>$v):?>
 					<!-- <div class="js-pro-btn2" sec-id="<?php //echo $v['id']?>"><?php //echo $v['title'];?></div>  -->
				<?php //endforeach;?>
				<?php //endif;?>
			<?php //endif;?>
			</div>
		</div>
		<?php //if(!empty($fenye['new_con'])):?>
<!-- 		<div class="w1190 goods"> 
			<div class="list-box f-cb" style="width:110%;">
			<?php //foreach($fenye['new_con'] as $k=>$v):?>
				<a href="<?php //echo site_url('product/info/'.$v['id']); ?>">
<!-- 					<div class="fl goods-frame"> 
						<img src="<?php //echo UPLOAD_URL.tag_photo($v['photo']); ?>" />
						<div class="goods-name"><?php //echo msubstr(str_replace('&nbsp;','',trim(strip_tags($v['title']))),0,18);?></div>
<!-- 						<div class="goods-state">SHOP&nbsp;NOW</div> 
<!-- 					</div> 
<!-- 				</a> 
			<?php //endforeach;?>
<!-- 			</div>
<!-- 		</div> -->
		<?php //echo $fenye['pagelink'];?>
<!-- 		<div class="paging"></div> -->
		<?php //endif;?>
	</div>

	<div class="pi-back"></div>
	
    <?php include_once VIEWS.'inc/footer.php'; ?>
<?php
	echo static_file('web/js/main.js');
?>
</body>
</html>
<script type="text/javascript">
$(function(){
	

	$('.nav ul').find('li').hover(function() {
		$(this).addClass('act-2')
		.siblings().removeClass('act-2');
		// $(".p-subnav").show();
	});

	var once = "<?php echo !empty($one)?$one:'';?>";
	var second = "<?php echo !empty($sec)?$sec:'';?>";
	var loadUrl='<?php echo site_url('product_ajax?one=');?>'+once+'&sec='+second;
	$(".js-ajax-box").load(loadUrl);

	//获取a标签的地址，ajax分页
    $('.js-ajax-box').on('click','.ajax_fpage', function(e){
        //event.preventDefault();
        var url = $(this).attr('href');
        $(".js-ajax-box").load(url);
        return false;
    })
	
	$('.js-pro-btn').hover(function() {
		var once = $(this).attr('once-id');
		var _left=$(this).position().left;
		$.ajax({
	        type:"GET",
	        url: '<?php echo site_url('product_ajax?one=');?>'+once,
	        dataType:'html',
	        success:function(ret){
	        	$('.js-ajax-box').html(ret);
	        	$('.p-first-down').css({
	        		left: _left
	        	});
	        }
	    })
	},function(){
		$('.p-first-down').hover(function(){

		},function(){
			$('.p-first-down').hide();
		});
		
	});
	
	$(document).on('click','.js-pro-btn2',function(){
		var second = $(this).attr('sec-id');
		var once = $('.js-pro-btn').attr('once-id');
		$.ajax({
	        type:"GET",
	        url: '<?php echo site_url('product_ajax?one=');?>'+once+'&sec='+second,
	        dataType:'html',
	        
	        success:function(ret){
	        	$('.js-ajax-box').html(ret);
	        }
	    })
	});
});	
window.onload=function(){
	autoImg('.js-wrapBox',3600,1,false,true,false,true);
	autoImg('.js-wrapBox2',3600,6,false,true,false,false);
}

</script>